import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.lang.management.MemoryType;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.stream.Collectors;

/**
 * @author panjunan <panjunan@kuaishou.com>
 * Created on 2020-09-30
 * <p>
 * 01102
 * 6
 * MFMMFF
 * zero 1 one 2
 * M 2 zero 1 one 3 02102
 * F 1 zero 4 one 1 12102
 * M 1 zero 4 one 3 22102
 * M 3 zero 4 one 7 22202
 * F 4 zero 7 one 4 22212
 * F 4 zero 7 one 7 22222
 *
 * https://ac.nowcoder.com/acm/contest/15397
 */
public class Main {
    public static void main(String[] args) throws IOException {
        //        second();
//        netEaseThree();
//        netEaseFour();
        Scanner scanner = new Scanner(System.in);

//        ggun(Integer.parseInt(scanner.nextLine()), Arrays.stream(scanner.nextLine().split(" ")).mapToInt(Integer::parseInt).toArray());
//        System.out.println(ggun(scanner.nextInt(), scanner.nextInt()));
//        zh2();
//        zh1();
//        zh3();
//        lq3();
//        lq5();
//        zj1(scanner.nextLine());
//        int n = scanner.nextInt();
//        scanner.nextLine();
//        List<List<Integer>> list = new ArrayList<>();
//        for (int i = 0; i < n; i++) {
//            list.add(new ArrayList<>());
//        }
//        int[][] happy = new int[n + 5][4];
//        for (int i = 0; i < n; i++) {
//            String s = scanner.nextLine();
//            happy[i] = Arrays.stream(s.split(" ")).mapToInt(Integer::valueOf).toArray();
//        }
//        Union union = new Union(n);
//        for (int i = 0; i < n - 1; i++) {
//            String s = scanner.nextLine();
//
//            int[] ints = Arrays.stream(s.split(" ")).mapToInt(Integer::valueOf).toArray();
//            list.get(ints[0]).add(ints[1]);
//            union.f[ints[1]] = ints[0];
//        }
//        int ans = 0;
//        for (int i = 0; i < 3; i++) {
//            ans = Math.max(ans, zj2(union.find(0), i, list, happy));
//        }
//        System.out.println(ans);
//        new Main().intToRoman(3);
        int[] ints = Arrays.stream(scanner.nextLine().split(" ")).mapToInt(Integer::valueOf).toArray();
        int x = ints[0], y = ints[1];
        int[][] baned = new int[][]{{x - 1, y - 2}, {x + 1, y + 2}, {x - 2, y - 1}, {x + 2, y + 1},
                {x + 1, y -2}, {x + 2, y - 1}, {x - 1, y + 2}, {x - 2, y + 1}, {x + 1, y+ 1}};
        zjmemo[0][0] = 1L;
        zjmemo[x][y] = 0L;
        System.out.println(zj2(ints[2], ints[3], x, y, baned));

    }

    static void zj1(String s) {
        Map<Character, Integer> map = new HashMap<>();
        for (char c : s.toCharArray()) {
            map.put((c), map.getOrDefault(c, 0) + 1);
        }

        Map<Character, Integer> newMap = new HashMap<>();
        int[] ans = new int[]{0, s.length() - 1};
        int l = 0;
        for (int i = 0; i < s.length(); i++) {
            char cur = s.charAt(i);
            newMap.put(cur, newMap.getOrDefault(cur, 0) + 1);
            while (newMap.size() >= map.size()) {
                if (i - l < ans[1] - ans[0]) {
                    ans = new int[]{l, i};
                }
                char cl = s.charAt(l);
                int cnt = newMap.get(cl);
                if (cnt <= 1) {
                    newMap.remove(cl);
                } else {
                    newMap.put(cl, cnt - 1);
                }
                l++;
            }
        }
        System.out.println(ans[0] + "," + (ans[1] - ans[0] + 1));
    }

    static long zj2(int i, int t, List<List<Integer>> children, int[][] happy) {
        if (zjmemo[i][t] != null) {
            return zjmemo[i][t];
        }

        zjmemo[i][t] = happy[i][t];
        for (Integer integer : children.get(i)) {
            zjmemo[i][t] += Math.max(zj2(integer, (t + 1) % 3, children, happy), zj2(integer, (t + 2) % 3, children, happy));
        }

        return zjmemo[i][t];
    }

    static Long[][] zjmemo = new Long[100][100];
    static int[][] dirs = new int[][]{{-1, -2}, {-2, -1}};

    static long zj2(int i, int j, int f, int g, int[][] baned) {
        if (i < 0 || j < 0) {
            return 0;
        }
        for (int[] b : baned) {
            if (i == b[0] && j == b[1]) {
                return 0;
            }
        }
        if (zjmemo[i][j] != null) {
            return zjmemo[i][j];
        }
//        if (i - 1 == f && j - 1 == g) {
//            return 0;
//        }
        zjmemo[i][j] = 0L;
        for (int[] dir : dirs) {
            int x = i + dir[0], y = j + dir[1];
            zjmemo[i][j] += zj2(x, y, f, g, baned);
        }
        return zjmemo[i][j];

    }

}

class Union {
    int[] f;

    public Union(int n) {
        f = new int[n + 5];
        for (int i = 0; i < f.length; i++) {
            f[i] = i;
        }
    }

    int find(int x) {
        int fx = f[x];
        while (fx != x) {
            return f[x] = find(f[x]);
        }
        return f[x];
    }

    void merge(int x, int y) {
        int fx = find(x), fy = find(y);
        if (fx > fy) {

            f[fx] = fy;
        } else {
            f[fy] = fx;
        }
    }

}

class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;

}

class SegmentTree {
    int[] tree;
    int n;

    public SegmentTree(int[] nums) {
        if (nums.length > 0) {
            n = nums.length;
            tree = new int[n * 2];
            buildTree(nums);
        }
    }

    private void buildTree(int[] nums) {
        for (int i = n, j = 0; i < 2 * n; i++, j++) {
            tree[i] = nums[j];
        }
        for (int i = n - 1; i > 0; --i) {
            tree[i] = tree[i * 2] + tree[i * 2 + 1];
        }
    }

    public void update(int pos, int val) {
        pos += n;
        tree[pos] = val;
        while (pos > 0) {
            int left = pos;
            int right = pos;
            if (pos % 2 == 0) {
                right = pos + 1;
            } else {
                left = pos - 1;
            }
            // parent is updated after child is updated
            tree[pos / 2] = tree[left] + tree[right];
            pos /= 2;
        }
    }

    public int sumRange(int l, int r) {
        // get leaf with value 'l'
        l += n;
        // get leaf with value 'r'
        r += n;
        int sum = 0;
        while (l <= r) {
            if ((l % 2) == 1) {
                sum += tree[l];
                l++;
            }
            if ((r % 2) == 0) {
                sum += tree[r];
                r--;
            }
            l /= 2;
            r /= 2;
        }
        return sum;
    }

}
